BablICCFlags flags,
int *icc_length);
+/* babl_space_get_rgbtoxyz:
+
+ Returns the double-precision 3x3 matrix used to convert linear
+ RGB data to CIE XYZ.
+ */
+const double * babl_space_get_rgbtoxyz (const Babl *space);
+
+/* babl_space_to_xyz:
+ *
+ * converts a double triplet from linear RGB to CIE XYZ.
+ */
+void babl_space_to_xyz (const Babl *space, const double *rgb, double *xyz);
+
+/* babl_space_from_xyz:
+ *
+ * converts double triplet from CIE XYZ to linear RGB
+ */
+void babl_space_from_xyz (const Babl *space, const double *xyz, double *rgb);
+
#endif
const char *language,
const char *counter);
-/* babl_space_get_rgbtoxyz:
-
- Returns the internal, double-precision 3x3 matrix used to convert linear
- RGB data to CIE XYZ.
- */
-const double * babl_space_get_rgbtoxyz (const Babl *space);
-
-/* babl_space_to_xyz:
- *
- * converts a double triplet from linear RGB to CIE XYZ.
- */
-void babl_space_to_xyz (const Babl *space, const double *rgb, double *xyz);
-
-/* babl_space_from_xyz:
- *
- * converts double triplet from CIE XYZ to linear RGB
- */
-void babl_space_from_xyz (const Babl *space, const double *xyz, double *rgb);
/**
* babl_format:
#include <math.h>
#include <string.h>
-#include "babl.h"
+#include "babl-internal.h"
#include "extensions/util.h"
#define DEGREES_PER_RADIAN (180 / 3.14159265358979323846)
}
static INLINE void
-conv_rgbAF_linear_rgbAF_gamma (const Babl *conversion,unsigned char *src,
- unsigned char *dst,
+conv_rgbAF_linear_rgbAF_gamma (const Babl *conversion,
+ unsigned char *src,
+ unsigned char *dst,
long samples)
{
const Babl *space = babl_conversion_get_destination_space (conversion);
#include "config.h"
#include <stdio.h>
-#include "babl.h"
+#include "babl-internal.h"
#include "base/util.h"
#include "extensions/util.h"
-/* There was some debate on #gimp about whether these constants
- * are accurate, for now I've elected to just follow whatever
- * babl/base does.
- * - Daniel
- */
-
-/* Float versions of the double constants in rgb-constants.h */
-
static void
conv_rgbaF_linear_y8_linear (const Babl *conversion,unsigned char *src,
unsigned char *dst,
{
const Babl *space = babl_conversion_get_source_space (conversion);
const double *rgbtoxyz = babl_space_get_rgbtoxyz (space);
- const float RGB_LUMINANCE_RED_FLOAT = rgbtoxyz[3];
+ const float RGB_LUMINANCE_RED_FLOAT = rgbtoxyz[3];
const float RGB_LUMINANCE_GREEN_FLOAT = rgbtoxyz[4];
- const float RGB_LUMINANCE_BLUE_FLOAT = rgbtoxyz[5];
+ const float RGB_LUMINANCE_BLUE_FLOAT = rgbtoxyz[5];
float *s = (float *) src;
long n = samples;